// 对话相关类型定义

export type MessageRole = 'user' | 'assistant';
export type MessageStatus = 'sending' | 'success' | 'error';

export interface Expert {
  id: string;
  name: string;
  title: string;
}

export interface Article {
  id: string;
  title: string;
  summary: string;
  url?: string;
}

export interface Message {
  id: string;
  sessionId: string;
  role: MessageRole;
  content: string;
  timestamp: number;
  status?: MessageStatus;
  experts?: Expert[];
  articles?: Article[];
  feedback?: 'like' | 'dislike';
}

export interface Session {
  id: string;
  title: string;
  messages: Message[];
  createdAt: number;
  updatedAt: number;
  lastMessage?: string;
}

export interface SendMessageRequest {
  sessionId: string;
  content: string;
}

export interface SendMessageResponse {
  messageId: string;
  content: string;
  timestamp: number;
}

export interface CreateSessionRequest {
  title?: string;
}

export interface CreateSessionResponse {
  sessionId: string;
  title: string;
  createdAt: number;
}